<html>
<head><meta charset="utf-8"><title>About watchman · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/About.20watchman.html">About watchman</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="184338089"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/About%20watchman/near/184338089" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Muhammad Mominul Huque <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/About.20watchman.html#184338089">(Dec 27 2019 at 19:09)</a>:</h4>
<p><span class="user-mention" data-user-id="133169">@matklad</span> <br>
Hi! As far as I can remember, you had mentioned using <a href="https://github.com/facebook/watchman" target="_blank" title="https://github.com/facebook/watchman">watchman</a> instead of notify which is the cause for a bug in macOS. It seems there's a <a href="https://crates.io/crates/watchman_client" target="_blank" title="https://crates.io/crates/watchman_client">rust binding available</a> of the client library. Should we use it? Or you have other approach?<br>
Sorry for the noise!</p>



<a name="184338963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/About%20watchman/near/184338963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/About.20watchman.html#184338963">(Dec 27 2019 at 19:27)</a>:</h4>
<p>Thanks a bunch for that link! Looks like the author of that library is the<br>
person who made watchman itself, we should definitely use this!</p>



<a name="184339066"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/About%20watchman/near/184339066" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/About.20watchman.html#184339066">(Dec 27 2019 at 19:29)</a>:</h4>
<p>Yes, in fact it's source can be found in the watchman repo: <a href="https://github.com/facebook/watchman/tree/master/rust" target="_blank" title="https://github.com/facebook/watchman/tree/master/rust">https://github.com/facebook/watchman/tree/master/rust</a></p>



<a name="184345301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/About%20watchman/near/184345301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Muhammad Mominul Huque <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/About.20watchman.html#184345301">(Dec 27 2019 at 21:39)</a>:</h4>
<p>I'd want to try implement this if there's no hurry. <span aria-label="grinning face with smiling eyes" class="emoji emoji-1f601" role="img" title="grinning face with smiling eyes">:grinning_face_with_smiling_eyes:</span> <br>
This crate uses async-await, so we'd need to use tokio. I am new within this async world and haven't touched the file watching part of rust-analyser yet, so I might need mentoring!</p>
<p>From a quick look, It seems we might only need to have changes in ra_vfs?</p>



<a name="184370176"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/About%20watchman/near/184370176" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/About.20watchman.html#184370176">(Dec 28 2019 at 10:52)</a>:</h4>
<p>I actually think that we need to redo api of vfs to better match<br>
watchman’s. It seems like watchman figured out better abstractions</p>



<a name="184389167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/About%20watchman/near/184389167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Muhammad Mominul Huque <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/About.20watchman.html#184389167">(Dec 28 2019 at 20:10)</a>:</h4>
<p>Hmm, it looks like it would be quite complex for me to do. I think we should open an issue so we don't forget and others can collaborate.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>